import Layout from '@/pages/layout/index'
import Login from '@/pages/login/index'

import {createBrowserRouter} from 'react-router-dom'
import { AuthRouter } from './authRouter'
import Home from '@/pages/home/index'
import About from '@/pages/platform/about/index'
import NotFound from '@/pages/notfound'
import UserManagement from '@/pages/system/user-management'
import MenuManagement from '@/pages/system/menu-management'
import RoleManagement from '@/pages/system/role-management'
import LogOperation from '@/pages/platform/log/log-operation'

const router=createBrowserRouter([
    {
        element:<AuthRouter><Layout/></AuthRouter>,
        path:'/',
        children:[
            {
                index:true,
                element:<Home/>
            },
            {
                path:'/system',
                element:<UserManagement/>
            },
            {
                path:'/system/user-management',
                element:<UserManagement/>
            },
            {
                path:'/system/user-management',
                element:<UserManagement/>
            },
            {
                path:'/system/menu-management',
                element:<MenuManagement/>
            },
            {
                path:'/system/role-management',
                element:<RoleManagement/>
            },
            {
                path:'/system/role-management',
                element:<RoleManagement/>
            },
            {
                path:'/log/log-operation',
                element:<LogOperation/>
            },
            
            {
                path:'/about',
                element:<About/>
            },
        ]
    },
    
    {
        path:'/login',
        element:<Login/>
    },
    {
        path:'*',
        element:<NotFound/>
    }
])

export default router